home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / xlisp.lbr / XLISP.DQC / xlisp.doc
Encoding:
Text File  |  1985-06-03  |  26.2 KB  |  676 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                  XLISP: An Experimental Object Oriented Language
  9.  
  10.  
  11.                                        by
  12.                                    David Betz
  13.                                114 Davenport Ave.
  14.                               Manchester, NH  03103
  15.  
  16.                                  (603) 625-4691
  17.  
  18.  
  19.     XLISP  is  an  experimental  programming  language combining some of the
  20.     features  of  LISP  with an object oriented extension capability. It was
  21.     implemented to allow experimentation with object oriented programming on
  22.     small  computers.  There  are  currently  implementations running on the
  23.     PDP-11 under RSX-11, RT-11, and UNIX V7, on the VAX-11 under VAX/VMS and
  24.     Berkeley  VAX/UNIX  and  on  the  Z-80 running CP/M-80. It is completely
  25.     written  in  the  programming  language 'C' and is believed to be easily
  26.     extended  with  user  written  builtin  functions  and  classes.  It  is
  27.     available free of charge and is in the public domain.
  28.  
  29.     Many traditional LISP functions are built into XLISP. In addition, XLISP
  30.     defines   the   object   classes  'Object',  'Class',  and  'Keymap'  as
  31.     primitives.  'Object' is the only class that has no superclass and hence
  32.     is  the  root of the class heirarchy tree. 'Class' is the class of which
  33.     all  classes are instances (it is the only object that is an instance of
  34.     itself). 'Keymap' is a class whose instances are mappings from input key
  35.     sequences to messages.
  36.  
  37.     This document is intended to be a brief description of XLISP. It assumes
  38.     some  knowledge of LISP and some understanding of the concepts of object
  39.     oriented programming.
  40.  
  41.     When XLISP is started, it issues the following prompt:
  42.  
  43.         >
  44.  
  45.     This indicates that XLISP is waiting for an expression to be typed. When
  46.     an  incomplete  expression  has been typed (one where the left and right
  47.     parens don't match) XLISP changes its prompt to:
  48.  
  49.         n>
  50.  
  51.     where  n  is  an  integer  indicating  how  many levels of parens remain
  52.     unclosed.
  53.  
  54.     When  a complete expression has been entered, XLISP attempts to evaluate
  55.     that  expression. If the expression evaluates successfully, XLISP prints
  56.     the  result  of  the  evaluation  and then returns to the initial prompt
  57.     waiting for another expression to be typed.
  58.  
  59.     Input can be aborted at any time by typing the EOF key. Another EOF will
  60.     exit from XLISP.
  61.  
  62.  
  63.     XLISP data types
  64.     ================
  65.  
  66.     There are several different data types available to XLISP programmers.
  67.  
  68.               o  symbols
  69.  
  70.               o  strings
  71.  
  72.               o  numbers
  73.  
  74.               o  objects
  75.  
  76.               o  file pointers
  77.  
  78.               o  lists
  79.  
  80.               o  subrs (builtin functions)
  81.  
  82.  
  83.     The XLISP evaluator
  84.     ===================
  85.  
  86.     The process of evaluation in XLISP:
  87.  
  88.          o  Integers, strings, objects, file pointers, and subrs evaluate to
  89.             themselves
  90.  
  91.          o  Symbols  evaluate  to  the  value  associated with their current
  92.             binding
  93.  
  94.          o  Lists are evaluated by evaluating the first element of the list
  95.  
  96.              o  If  it evaluates to a subr, the builtin function is executed
  97.                 using  the  remaining  list  elements as arguments (they are
  98.                 evaluated by the subr itself)
  99.  
  100.              o  If  it  evaluates  to  a  list,  the list is assumed to be a
  101.                 function  definition and the function is evaluated using the
  102.                 values of the remaining list elements as arguments
  103.  
  104.              o  If  it  evaluates  to  an object, the second list element is
  105.                 evaluated and used as a message selector. The message formed
  106.                 by  combining  the selector with the values of the remaining
  107.                 list elements is sent to the object.
  108.  
  109.  
  110.     XLISP lexical conventions
  111.     =========================
  112.  
  113.     The following conventions are followed when entering XLISP programs:
  114.  
  115.     Comments in XLISP code begin with a semi-colon character and continue to
  116.     the end of the line.
  117.  
  118.     Symbol names in XLISP can consist of any sequence of non-blank printable
  119.     characters except the following:
  120.  
  121.                 ( ) . ' " ;
  122.  
  123.     Symbol names must not begin with a digit.
  124.  
  125.     Integer  literals  consist  of a sequence of digits optionally beginning
  126.     with  a  '+'  or  '-'.  The  range of values an integer can represent is
  127.     limited  by  the  size of a C 'int' on the machine that XLISP is running
  128.     on.
  129.  
  130.     Literal strings are sequences of characters surrounded by double quotes.
  131.     Within  quoted  strings the '\' character is used to allow non-printable
  132.     characters to be included. The codes recognized are:
  133.  
  134.                 \\      means the character '\'
  135.                 \n      means newline
  136.                 \t      means tab
  137.                 \r      means return
  138.                 \e      means escape
  139.                 \nnn    means the character whose octal code is nnn
  140.  
  141.     The  single quote character can be used as a shorthand for a call on the
  142.     function 'quote':
  143.  
  144.                                 'foo
  145.         is equivalent to:
  146.                                 (quote foo)
  147.  
  148.  
  149.     Objects
  150.     =======
  151.  
  152.     Definitions:
  153.  
  154.          o  selector - a symbol used to select  an  appropriate method
  155.  
  156.          o  message - a selector and a list of actual arguments
  157.  
  158.          o  method - the code that implements a message
  159.  
  160.     Since XLISP was created to provide a simple basis for experimenting with
  161.     object  oriented  programming,  one of the primitive data types included
  162.     was  'object'.  In  XLISP,  an  object  consists  of  a  data  structure
  163.     containing  a pointer to the object's class as well as a list containing
  164.     the values of the object's instance variables.
  165.  
  166.     Officially,  there is no way to see inside an object (look at the values
  167.     of  its  instance variables). The only way to communicate with an object
  168.     is  by  sending  it a message. When the XLISP evaluator evaluates a list
  169.     the  value  of whose first element is an object, it interprets the value
  170.     of  the  second  element  of  the  list  (which must be a symbol) as the
  171.     message  selector.  The  evaluator determines the class of the receiving
  172.     object  and  attempts  to  find  a  method  corresponding to the message
  173.     selector  in  the set of messages defined for that class. If the message
  174.     is  not found in the object's class and the class has a super-class, the
  175.     search continues by looking at the messages defined for the super-class.
  176.     This  process  continues from one super-class to the next until a method
  177.     for the message is found. If no method is found, an error occurs.
  178.  
  179.     When  a method is found, the evaluator binds the receiving object to the
  180.     symbol  'self',  binds  the  class  in which the method was found to the
  181.     symbol 'msgclass', and evaluates the method using the remaining elements
  182.     of  the  original  list  as arguments to the method. These arguments are
  183.     always  evaluated  prior  to  being  bound to their corresponding formal
  184.     arguments. The result of evaluating the method becomes the result of the
  185.     expression.
  186.  
  187.  
  188.     Classes
  189.     =======
  190.  
  191.     Object  THE TOP OF THE CLASS HEIRARCHY
  192.  
  193.     Messages:
  194.  
  195.          name    description                               returns
  196.  
  197.          print   THE DEFAULT OBJECT PRINT ROUTINE          the object
  198.  
  199.          show    SHOW AN OBJECT'S INSTANCE VARIABLES       the object
  200.  
  201.          class   RETURN THE CLASS OF AN OBJECT             the oject class
  202.  
  203.          isnew   THE DEFAULT OBJECT INITIALIZATION ROUTINE the object
  204.  
  205.          sendsuper <sel> [<args>...] SEND SUPERCLASS A MESSAGE
  206.                     <sel>       the message selector
  207.                     <args>      the message arguments
  208.                     returns     the result of sending the message
  209.  
  210.  
  211.     Class   THE CLASS OF ALL OBJECT CLASSES (including itself)
  212.  
  213.     Messages:
  214.  
  215.                 new     CREATE A NEW INSTANCE OF A CLASS
  216.                     returns     the new class object
  217.  
  218.                 isnew [<scls>]  INITIALIZE A NEW CLASS
  219.                     <scls>      the superclass
  220.                     returns     the new class object
  221.  
  222.                 answer <msg> <fargs> <code>     ADD A MESSAGE TO A CLASS
  223.                     <msg>       the message symbol
  224.                     <fargs>     the formal argument list
  225.                                   this list is of the form:
  226.                                     (<farg>... [/ <local>...])
  227.                                   where
  228.                                     <farg>      a formal argument
  229.                                     <local>     a local variable
  230.                     <code>      a list of executable expressions
  231.                     returns     the object
  232.  
  233.                 ivars <vars>    DEFINE THE LIST OF INSTANCE VARIABLES
  234.                     <vars>      the list of instance variable symbols
  235.                     returns     the object
  236.  
  237.                 cvars <vars>    DEFINE THE LIST OF CLASS VARIABLES
  238.                     <vars>      the list of class variable symbols
  239.                     returns     the object
  240.  
  241.  
  242.     When  a  new instance of a class is created by sending the message 'new'
  243.     to   an  existing  class,  the  message  'isnew'  followed  by  whatever
  244.     parameters were passed to the 'new' message is sent to the newly created
  245.     object.
  246.  
  247.     When  a  new class is created by sending the 'new' message to the object
  248.     'Class',  an  optional  parameter  may  be specified indicating of which
  249.     class  the  newly generated class is to be a subclass. If this parameter
  250.     is omitted, the new class will be a subclass of 'Object'.
  251.  
  252.     Example:
  253.  
  254.             ; create 'Foo' as a subclass of 'Object'
  255.             (setq Foo (Class 'new))
  256.  
  257.             ; create 'Bar' as a subclass of 'Foo'
  258.             (setq Bar (Class 'new Foo))
  259.  
  260.     A  class  inherits  all instance variables, class variables, and methods
  261.     from its super-class.
  262.  
  263.  
  264.     The 'Keymap' Class:
  265.  
  266.     A keymap is data structure that translates a sequence of keystrokes into
  267.     a message.
  268.  
  269.         In order to create a keymap:
  270.  
  271.                 (setq km (Keymap 'new))
  272.  
  273.         In order to add a key definition to a keymap (km):
  274.  
  275.                 (km 'key "\eA" 'up)
  276.                 (km 'key "\eB" 'down)
  277.                 (km 'key "\eC" 'right)
  278.                 (km 'key "\eD" 'left)
  279.  
  280.         Executing a keymap:
  281.  
  282.                 (setq env (list ob1 ob2 ob3 ob4))
  283.                 (km 'process env)
  284.  
  285.     When  the  process  message is sent, its method enters a character input
  286.     loop  calling  kbin to get single unechoed characters from the keyboard.
  287.     When a sequence of characters is found that matches one of the sequences
  288.     defined  in  a key function call, the corresponding message is sent. The
  289.     method  tries  to  send  the  message  to  each  of  the  objects in the
  290.     environment  list.  It  stops  when it finds an object that knows how to
  291.     answer  the  message.  Along  with the message selector given in the key
  292.     definition,  the  sequence  of  matched characters is passed as a single
  293.     string parameter.
  294.  
  295.             Keymap
  296.  
  297.                 new     CREATE A NEW KEYMAP
  298.                     returns     a new keymap
  299.  
  300.                 isnew   INITIALIZE THE NEW KEYMAP
  301.                     returns     the keymap
  302.  
  303.                 key <kstr> <ksym>       ADD A KEY DEFINITION TO A KEYMAP
  304.                     <kstr>      the string defining the key
  305.                     <ksym>      the symbol for the message
  306.                     returns     the keymap
  307.  
  308.                 process <envlist>       PROCESS INPUT USING A KEYMAP
  309.                     <envlist>   list of active objects
  310.                     returns     the keymap when a message evaluates to nil
  311.  
  312.  
  313.     Symbols
  314.     =======
  315.  
  316.               o  self  -  the  current  object  (within  a   message
  317.                  context)
  318.  
  319.               o  msgclass - the class in which  the  current  method
  320.                  was found
  321.  
  322.               o  currentenv - the environment list for  the  current
  323.                  invocation of kmprocess
  324.  
  325.               o  oblist - the object list
  326.  
  327.  
  328.     Utility functions
  329.     =================
  330.  
  331.         (load <fname>)  LOAD AN XLISP SOURCE FILE
  332.             <fname>     the filename string
  333.             returns     the filename
  334.  
  335.         (mem)   SHOW MEMORY ALLOCATION STATISTICS
  336.             returns     nil
  337.  
  338.         (gc)    FORCE GARBAGE COLLECTION
  339.             returns     nil
  340.  
  341.         (alloc <num>)   CHANGE NUMBER OF NODES TO ALLOCATE IN EACH SEGMENT
  342.             <num>       the number of nodes to allocate
  343.             returns     the old number of nodes to allocate
  344.  
  345.         (expand <num>)  EXPAND MEMORY BY ADDING SEGMENTS
  346.             <num>       the number of segments to add
  347.             returns     the number of segments added
  348.  
  349.  
  350.     Functions
  351.     =========
  352.  
  353.         (eval <expr>)   EVALUATE AN XLISP EXPRESSION
  354.             <expr>      the expression to be evaluated
  355.             returns     the result of evaluating the expression
  356.  
  357.         (set <sym> <expr>)      SET THE VALUE OF A SYMBOL
  358.             <sym>       the symbol being set
  359.             <expr>      the new value
  360.             returns     the new value
  361.  
  362.         (setq <qsym> <expr>)    SET THE VALUE OF A SYMBOL
  363.             <qsym>      the symbol being set (quoted)
  364.             <expr>      the new value
  365.             returns     the new value
  366.  
  367.         (print <expr>...)       PRINT A LIST OF VALUES
  368.             <expr>      the expressions to be printed
  369.             returns     nil
  370.  
  371.         (princ <expr>...)       PRINT A LIST OF VALUES WITHOUT QUOTING
  372.             <expr>      the expressions to be printed
  373.             returns     nil
  374.  
  375.         (quote <expr>)  RETURN AN EXPRESSION UNEVALUATED
  376.         or
  377.         '<expr>
  378.             <expr>      the expression to be quoted (quoted)
  379.             returns     <expr> unevaluated
  380.  
  381.         (if <texpr> <expr1> [ <expr2> ])        EXECUTE EXPRESSIONS CONDITIONALLY
  382.             <texpr>     test expression
  383.             <expr1>     expression evaluated if texpr is non-nil or non-zero
  384.             <expr2>     expression evaluated if texpr is nil or zero
  385.             returns     the value of the expression evaluated
  386.  
  387.         (while <texpr> <expr>...)       ITERATE WHILE AN EXPRESSION IS TRUE
  388.             <texpr>     test expression evaluated at start of each iteration
  389.             <expr>      expressions evaluated as long as <texpr> evaluates to
  390.                         non-nil or non-zero
  391.             returns     the result of the last expression evaluated
  392.  
  393.         (repeat <iexpr> <expr>...)      ITERATE USING A REPEAT COUNT
  394.             <iexpr>     integer expression indicating the repeat count
  395.             <expr>      expressions evaluated <iexpr> times
  396.             returns     the result of the last expression evaluated
  397.  
  398.         (foreach <qsym> <list> <expr>...) ITERATE FOR EACH ELEMENT IN A LIST
  399.             <qsym>      symbol to assign each list element to (quoted)
  400.             <list>      list to iterate through
  401.             <expr>      expressions evaluated for each element in the list
  402.             returns     the result of the last expression evaluated
  403.  
  404.         (defun <qsym> <qfargs> <expr>...)       DEFINE A NEW FUNCTION
  405.             <qsym>      symbol to be defined (quoted)
  406.             <qfargs>    list of formal arguments (quoted)
  407.                           this list is of the form:
  408.                             (<farg>... [/ <local>...])
  409.                           where
  410.                             <farg>      is a formal argument
  411.                             <local>     is a local variable
  412.             <expr>      expressions constituting the body of the
  413.                         function (quoted)
  414.             returns     the function symbol
  415.  
  416.         (cond <pair>...)        EVALUATE CONDITIONALLY
  417.             <pair>      pair consisting of:
  418.                             (<pred> <expr>)
  419.                           where
  420.                             <pred>      is a predicate expression
  421.                             <expr>      is evaluated if the predicate
  422.                                         is not nil
  423.             returns     the value of the first expression whose predicate
  424.                         is not nil
  425.  
  426.         (exit)  EXIT XLISP
  427.             returns     never returns
  428.  
  429.     I/O Functions
  430.     =============
  431.  
  432.         (fopen <fname> <mode>)  OPEN A FILE
  433.             <fname>     the file name string
  434.             <mode>      the open mode string
  435.             returns     a file pointer
  436.  
  437.         (fclose <fp>)   CLOSE A FILE
  438.             <fp>        the file pointer
  439.             returns     nil
  440.  
  441.         (getc [<fp>])   GET A CHARACTER FROM A FILE
  442.             <fp>        the file pointer (default is stdin)
  443.             returns     the character (integer)
  444.  
  445.         (putc <ch> [<fp>])      PUT A CHARACTER TO A FILE
  446.             <ch>        the character to put (integer)
  447.             <fp>        the file pointer (default is stdout)
  448.             returns     the character (integer)
  449.  
  450.         (fgets [<fp>])  GET A STRING FROM A FILE
  451.             <fp>        the file pointer (default is stdin)
  452.             returns     the input string
  453.  
  454.         (fputs <str> [<fp>]) PUT A STRING TO A FILE
  455.             <str>       the string to output
  456.             <fp>        the file pointer (default is stdout)
  457.             returns     the string
  458.  
  459.     String Functions
  460.     ================
  461.  
  462.         (strcat <expr>...) CONCATENATE STRINGS
  463.             <expr>      string expressions
  464.             returns     result of concatenating the strings
  465.  
  466.         (strlen <expr>) COMPUTE THE LENGTH OF A STRING
  467.             <expr>      the string expression
  468.             returns     the length of the string
  469.  
  470.         (substr <expr> <sexpr> [<lexpr>]) RETURN SUBSTRING
  471.             <expr>      string expression
  472.             <sexpr>     starting position
  473.             <lexpr>     optional length (default is rest of string)
  474.             returns     substring starting at <sexpr> for <lexpr>
  475.  
  476.         (ascii <expr>)  NUMERIC VALUE OF CHARACTER
  477.             <expr>      string expression
  478.             returns     numeric value of first character (according to ASCII)
  479.  
  480.         (chr <expr>)    CHARACTER EQUIVALENT OF ASCII VALUE
  481.             <expr>      numeric expression
  482.             returns     one character string with ASCII equivalent of <expr>
  483.  
  484.         (atoi <expr>)   CONVERT AN ASCII STRING TO AN INTEGER
  485.             <expr>      string expression
  486.             returns     the integer value of the string expression
  487.  
  488.         (itoa <expr>)   CONVERT AN INTEGER TO AN ASCII STRING
  489.             <expr>      integer expression
  490.             returns     the string representation of the integer value
  491.  
  492.  
  493.     List Functions
  494.     ==============
  495.  
  496.         (head <expr>)   RETURN THE HEAD ELEMENT OF A LIST
  497.         or
  498.         (car <expr)
  499.             <expr>      the list
  500.             returns     the first element of the list
  501.  
  502.         (tail <expr>)   RETURN THE TAIL ELEMENTS OF A LIST
  503.         or
  504.         (cdr <expr>)
  505.             <expr>      the list
  506.             returns     the list minus the first element
  507.  
  508.         (list <expr>...)        CREATE A LIST OF VALUES
  509.             <expr>      evaluated expressions to be combined into a list
  510.             returns     the new list
  511.  
  512.         (nth <n> <list>)        RETURN THE NTH ELEMENT OF A LIST
  513.             <n>         the number of the element to return
  514.             <list>      the list to return the nth element of
  515.             returns     the nth element or nil if the list isn't that long
  516.  
  517.         (append <expr>...)      APPEND LISTS
  518.             <expr>      lists whose elements are to be appended
  519.             returns     the new list
  520.  
  521.         (cons <e1> <e2>)        CONSTRUCT A NEW LIST ELEMENT
  522.             <e1>        becomes the head (car) of the new list
  523.             <e2>        becomes the tail (cdr) of the new list
  524.             returns     the new list
  525.  
  526.         (null <expr>)   CHECKS FOR AN EMPTY LIST
  527.             <expr>      the list to check
  528.             returns     t if the list is empty, nil otherwise
  529.  
  530.         (atom <expr>)   CHECKS FOR AN ATOM (ANYTHING THAT ISN'T A LIST)
  531.             <expr>      the expression to check
  532.             returns     t if the value is an atom, nil otherwise
  533.  
  534.         (listp <expr>)  CHECKS FOR A LIST
  535.             <expr>      the expression to check
  536.             returns     t if the value is a list, nil otherwise
  537.  
  538.         (type <expr>)   RETURNS THE TYPE OF THE EXPRESSION
  539.             <expr>      the expression to return the type of
  540.             returns     nil if the value is nil otherwise one of the symbols:
  541.                             SYM  for symbols
  542.                             OBJ  for objects
  543.                             LIST for list nodes
  544.                             KMAP for keymap nodes
  545.                             SUBR for internal subroutine nodes
  546.                             STR  for string nodes
  547.                             INT  for integer nodes
  548.                             FPTR for file pointer nodes
  549.  
  550.         (eq <expr1> <expr2>)    CHECKS FOR THE EXPRESSIONS BEING THE SAME
  551.             <expr1>     the first expression
  552.             <expr2>     the second expression
  553.             returns     t if they are equal, nil otherwise
  554.  
  555.         (equal <expr1> <expr2>) CHECKS FOR THE EXPRESSIONS BEING EQUAL
  556.             <expr1>     the first expression
  557.             <expr2>     the second expression
  558.             returns     t if they are equal, nil otherwise
  559.  
  560.         (read [ <str> ])        READ AN XLISP EXPRESSION
  561.             <str>       the string to use as input (optional)
  562.             returns     the expression read
  563.  
  564.         (reverse <expr>)        REVERSE A LIST
  565.             <expr>      the list to reverse
  566.             returns     a new list in the reverse order
  567.  
  568.         (length <expr>) FIND THE LENGTH OF A LIST
  569.             <expr>      the list to find the length of
  570.             returns     the length
  571.  
  572.     Arithmetic Functions
  573.     ====================
  574.  
  575.         (+ <expr>...)   ADD A LIST OF VALUES
  576.             <expr>      expressions to be added
  577.             returns     the result of the addition
  578.  
  579.         (- <expr>...)   SUBTRACT A LIST OF VALUES
  580.             <expr>      expressions to be subtracted
  581.             returns     the result of the subtraction
  582.  
  583.         (* <expr>...)   MULTIPLY A LIST OF VALUES
  584.             <expr>      expressions to be multiplied
  585.             returns     the result of the multiplication
  586.  
  587.         (/ <expr>...)   DIVIDE A LIST OF VALUES
  588.             <expr>      expressions to be divided
  589.             returns     the result of the division
  590.  
  591.         (% <expr>...)   MODulus A LIST OF VALUES
  592.             <expr>      expressions to be MODulused
  593.             returns     the result of mod
  594.  
  595.         (& <expr>...)   THE BITWISE AND OF A LIST OF VALUES
  596.             <expr>      expressions to be ANDed
  597.             returns     the bit by bit ANDing of expressions
  598.  
  599.         (| <expr...)    THE BITWISE OR OF A LIST OF VALUES
  600.             <expr>      expressions to be ORed
  601.             returns     the bit by bit ORing of expressions
  602.  
  603.         (~ <expr>)      THE BITWISE NOT OF A VALUE
  604.             <expr>      expression to be NOTed
  605.             returns     the bit by bit inversion of expression
  606.  
  607.         (min <expr>...) THE SMALLEST OF A LIST OF VALUES
  608.             <expr>      expressions to be checked
  609.             returns     the smallest value of the list
  610.  
  611.         (max <expr>...) THE LARGEST OF A LIST OF VALUES
  612.             <expr>      expressions to be checked
  613.             returns     the largest value of the list
  614.  
  615.         (abs <expr>)    THE ABSOLUTE VALUE OF AN EXPRESSION
  616.             <expr>      integer expression
  617.             returns     the absolute value of the expression
  618.  
  619.  
  620.     Boolean Functions
  621.     =================
  622.  
  623.         (&& <expr>...)  THE LOGICAL AND OF A LIST OF VALUES
  624.             <expr>      expressions to be ANDed
  625.             returns     the result of anding the expressions
  626.                         (evaluation of expressions stops after the first
  627.                          expression that evaluates to false)
  628.  
  629.         (|| <expr>...)  THE LOGICAL OR OF A LIST OF VALUES
  630.             <expr>      expressions to be ORed
  631.             returns     the result of oring the expressions
  632.                         (evaluation of expressions stops after the first
  633.                          expression that evaluates to true)
  634.  
  635.         (! <expr>)      THE LOGICAL NOT OF A VALUE
  636.             <expr>      expression to be NOTed
  637.             return      logical not of <expr>
  638.  
  639.  
  640.     Relational Functions
  641.     ====================
  642.  
  643.     The  relational  functions  can be used to compare integers and strings.
  644.     The functions '==' and '!=' can also be used to compare other types. The
  645.     result of these comparisons is computed the same way as for 'eq'.
  646.  
  647.         (< <e1> <e2>)   TEST FOR LESS THAN
  648.             <e1>        the left operand of the comparison
  649.             <e2>        the right operand of the comparison
  650.             returns     the result of comparing <e1> with <e2>
  651.  
  652.         (<= <e1> <e2>)  TEST FOR LESS THAN OR EQUAL TO
  653.             <e1>        the left operand of the comparison
  654.             <e2>        the right operand of the comparison
  655.             returns     the result of comparing <e1> with <e2>
  656.  
  657.         (== <e1> <e2>)  TEST FOR EQUAL TO
  658.             <e1>        the left operand of the comparison
  659.             <e2>        the right operand of the comparison
  660.             returns     the result of comparing <e1> with <e2>
  661.  
  662.         (!= <e1> <e2>)  TEST FOR NOT EQUAL TO
  663.             <e1>        the left operand of the comparison
  664.             <e2>        the right operand of the comparison
  665.             returns     the result of comparing <e1> with <e2>
  666.  
  667.         (>= <e1> <e2>)  TEST FOR GREATER THAN OR EQUAL TO
  668.             <e1>        the left operand of the comparison
  669.             <e2>        the right operand of the comparison
  670.             returns     the result of comparing <e1> with <e2>
  671.  
  672.         (> <e1> <e2>)   TEST FOR GREATER THAN
  673.             <e1>        the left operand of the comparison
  674.             <e2>        the right operand of the comparison
  675.             returns     the result of comparing <e1> with <e2>
  676.